<script type="text/javascript">
var _recommendCount = parseInt("{$recommend_count}");
function action()
{
	var strhtml;
	strhtml = $('#ajaxcontent .indexrow').eq(_recommendCount-1).html();
	if(strhtml == null){
		return false;
	}
	//$('#ajaxcontent .indexrow').eq(0).appendTo("#ajaxcontent");
	$('#ajaxcontent .indexrow').eq(_recommendCount-1).remove();
	$('#ajaxcontent').prepend('<div class="indexrow" style="display:none;" id="indexrowid">'+strhtml+'</div>');
	$('#ajaxcontent .indexrow').eq(0).slideDown(500);
}
$(document).ready(function(){
	var Interval;
	Interval = setInterval('action()', 4000);
	$("#ajaxcontent").hover(
		function(){clearInterval(Interval);},
		function(){Interval = setInterval('action()',4000);}
	);
});
</script>
<script type="text/javascript">
	$(document).ready(function(){	
		$("#topic_list_{$val[tid]}").mouseover(function(){$("#topic_list_{$val[tid]}_time").hide();$("#topic_list_{$val[tid]}_view").show();});
		$("#topic_list_{$val[tid]}").mouseout(function(){$("#topic_list_{$val[tid]}_time").show();$("#topic_list_{$val[tid]}_view").hide();});
	});
</script>


<style type="text/css">
.topicTxt{ margin:0;}
.feedCell .from{ padding:0;}
.option{ width:10px; display:none; overflow:hidden;}
</style>
<!--{if $recommend_topics}-->
<div class="comBox" id="ajaxcontent" style="margin:0; overflow:hidden;">
  <!--{loop $recommend_topics $val}-->
  <!--{eval $_ad++;}-->
  <div id="topic_list_{$val[tid]}" class="indexrow">
    <div class="feedCell" style="overflow:hidden">
      <div class="avatar"><a href="index.php?mod={$val[username]}" class="nude_face"><img onerror="javascript:faceError(this);" src="{$val[face]}" /></a></div>
      <div class="Contant">
        <div class="topicTxt">
          <p><a title="{$val[username]}" href="index.php?mod={$val[username]}">{$val[nickname]}</a>{$val[validate_html]}: <span>{$val[content]}</span></p>
        </div>
        {template "topic_guest_index_share"}
        {template "topic_share_quote"}
		<div class="from"> 
		<div class="mycome">{if !$no_from}{$val[from_html]}{/if}</div>
        <span style="float:right;">
        <a id="topic_list_{$val[tid]}_time" href="index.php?mod=topic&code={$val[tid]}" target="_blank" title="查看">{$val[dateline]} </a>
        <a id="topic_list_{$val[tid]}_view" href="index.php?mod=topic&code={$val[tid]}" target="_blank" title="发布时间：{$val[dateline]}" style="display:none;" >查看详情</a>
        </span>

		</div>
	 </div>
    </div>
  </div>
  <!--{/loop}-->
</div>
<!--{/if}-->
<div id="Pcontent" style="z-index:100; position:absolute; height:550px; overflow:hidden; margin:0;"></div>

